package com.qmq.app.utils;

import java.util.regex.Pattern;

/**
 * @Author: Kappi
 * @Date: 2023-3-6 16:57
 * @ClassName: StrUtils
 * @Description: com.qmq.app.utils StrUtils
 * @Version 1.8
 */
public class StrUtils {

    public static boolean isEmail(String email) {
        if (email == null || email.length() < 1 || email.length() > 256) {
            return false;
        }
        Pattern pattern = Pattern.compile("^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$");
        return pattern.matcher(email).matches();
    }
}
